package com.service.Impl;

import com.Annotation.Autowired;
import com.Annotation.Bean;
import com.dao.BookDao;
import com.dao.UserDao;
import com.entity.Book;
import com.entity.User;
import com.service.BookService;

import java.util.ArrayList;
import java.util.List;
@Bean
public class BookServiceImpl implements BookService {
    @Autowired
    private UserDao userDao; //=new UserDaoImpl();
    @Autowired
    private BookDao bookDao; //=new BookDaoImpl();


    @Override
    public void borrow(User user, Book book) {


        List<User>allUsers=userDao.findAllUsers();
        bookDao.findAllBooks();
        System.out.println(user.getUsername()+"借了"+book.getName());
    }
}
